﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace CentralMonitoring
{
    internal static class Program
    {
        [DllImport("user32.dll")]
        private static extern bool SetProcessDPIAware();
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            //string processName = Process.GetCurrentProcess().ProcessName;
            //Process[] myProcesses = Process.GetProcessesByName(processName);
            //if (myProcesses.Length > 1)
            //{
            //    MessageBox.Show("程序正在运行，您不需要再次打开！", "提醒", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    System.Environment.Exit(1);
            //}
            if (Environment.OSVersion.Version.Major >= 6)
            {
                SetProcessDPIAware();
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LoginForm());
            //Application.Run(new LoginFrm());
        }
    }
}
